# 记录脚本的网络请求

# cd到此处是为了迎合winetricks检查命令是否可用的逻辑，让它不报错
cd /usr/bin/

aria2c() {
    echo "[$(date '+%F_%T')]" aria2c "$@" >> /tmp/winetricks-replaced.log
    /usr/bin/aria2c "$@"
    return $?
}

curl() {
    echo "[$(date '+%F_%T')]" curl "$@" >> /tmp/winetricks-replaced.log
    /usr/bin/curl "$@"
    return $?
}

fetch() {
    echo "[$(date '+%F_%T')]" fetch "$@" >> /tmp/winetricks-replaced.log
    /usr/bin/fetch "$@"
    return $?
}

wget() {
    echo "[$(date '+%F_%T')]" wget "$@" >> /tmp/winetricks-replaced.log
    /usr/bin/wget "$@"
    return $?
}

echo --------------------------------------------------------------------------------------
echo 'WINETRICKS_NETWORK_DEBUG enabled, see /tmp/winetricks-replaced.log for more details.'
echo --------------------------------------------------------------------------------------
